// Upgrade NOTE: commented out 'float4 unity_LightmapST', a built-in variable
// Upgrade NOTE: commented out 'float4x4 _World2Object', a built-in variable
// Upgrade NOTE: commented out 'sampler2D unity_Lightmap', a built-in variable
// Upgrade NOTE: replaced '_World2Object' with 'unity_WorldToObject'
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
// Upgrade NOTE: replaced tex2D unity_Lightmap with UNITY_SAMPLE_TEX2D

Shader "Hidden/TerrainEngine/Details/WavingDoublePass" {
Properties {
 _WavingTint ("Fade Color", Color) = (0.7,0.6,0.5,0)
 _MainTex ("Base (RGB) Alpha (A)", 2D) = "white" { }
 _WaveAndDistance ("Wave and distance", Vector) = (12,3.6,1,1)
 _Cutoff ("Cutoff", Float) = 0.5
}
SubShader { 
 LOD 200
 Tags { "QUEUE"="Geometry+200" "IGNOREPROJECTOR"="true" "DisableBatching"="true" "RenderType"="Grass" }
 Pass {
  Name "FORWARD"
  Tags { "LIGHTMODE"="ForwardBase" "QUEUE"="Geometry+200" "IGNOREPROJECTOR"="true" "SHADOWSUPPORT"="true" "DisableBatching"="true" "RenderType"="Grass" }
  Cull Off
  ColorMask RGB
  GpuProgramID 25021
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"
#define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
#define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
#define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
#define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)


#define CODE_BLOCK_VERTEX
//uniform float4 unity_SHAr;
//uniform float4 unity_SHAg;
//uniform float4 unity_SHAb;
//uniform float4 unity_SHBr;
//uniform float4 unity_SHBg;
//uniform float4 unity_SHBb;
//uniform float4 unity_SHC;
//uniform float4x4 UNITY_MATRIX_MVP;
//uniform float4x4 unity_ObjectToWorld;
// uniform float4x4 _World2Object;
uniform float4 _WavingTint;
uniform float4 _WaveAndDistance;
uniform float4 _CameraPosition;
uniform float4 _MainTex_ST;
//uniform float4 _WorldSpaceLightPos0;
uniform float4 _LightColor0;
uniform sampler2D _MainTex;
uniform float _Cutoff;
struct appdata_t
{
    float4 vertex :POSITION;
    float4 color :COLOR;
    float3 normal :NORMAL;
    float4 texcoord :TEXCOORD0;
};

struct OUT_Data_Vert
{
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float3 xlv_TEXCOORD1 :TEXCOORD1;
    float3 xlv_TEXCOORD2 :TEXCOORD2;
    float4 xlv_COLOR0 :COLOR0;
    float3 xlv_TEXCOORD3 :TEXCOORD3;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float3 xlv_TEXCOORD1 :TEXCOORD1;
    float4 xlv_COLOR0 :COLOR0;
    float3 xlv_TEXCOORD3 :TEXCOORD3;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
};

OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    float3 worldNormal_1;
    float3 tmpvar_2;
    float4 vertex_3;
    vertex_3.yw = in_v.vertex.yw;
    float4 color_4;
    color_4.xyz = in_v.color.xyz;
    float3 waveColor_5;
    float3 waveMove_6;
    float4 s_7;
    float4 waves_8;
    waves_8 = (in_v.vertex.x * (float4(0.012, 0.02, 0.06, 0.024) * _WaveAndDistance.y));
    waves_8 = (waves_8 + (in_v.vertex.z * (float4(0.006, 0.02, 0.02, 0.05) * _WaveAndDistance.y)));
    waves_8 = (waves_8 + (_WaveAndDistance.x * float4(1.2, 2, 1.6, 4.8)));
    float4 tmpvar_9;
    tmpvar_9 = frac(waves_8);
    waves_8 = tmpvar_9;
    float4 val_10;
    float4 s_11;
    val_10 = ((tmpvar_9 * 6.408849) - 3.141593);
    float4 tmpvar_12;
    tmpvar_12 = (val_10 * val_10);
    float4 tmpvar_13;
    tmpvar_13 = (tmpvar_12 * val_10);
    float4 tmpvar_14;
    tmpvar_14 = (tmpvar_13 * tmpvar_12);
    s_11 = (((val_10 + (tmpvar_13 * (-0.1616162))) + (tmpvar_14 * 0.0083333)) + ((tmpvar_14 * tmpvar_12) * (-0.00019841)));
    s_7 = (s_11 * s_11);
    s_7 = (s_7 * s_7);
    float tmpvar_15;
    tmpvar_15 = (dot(s_7, float4(0.6741998, 0.6741998, 0.2696799, 0.13484)) * 0.7);
    s_7 = (s_7 * (in_v.color.w * _WaveAndDistance.z));
    waveMove_6.y = 0;
    waveMove_6.x = dot(s_7, float4(0.024, 0.04, (-0.12), 0.096));
    waveMove_6.z = dot(s_7, float4(0.006, 0.02, (-0.02), 0.1));
    vertex_3.xz = (in_v.vertex.xz - (waveMove_6.xz * _WaveAndDistance.z));
    float3 tmpvar_16;
    tmpvar_16 = lerp(float3(0.5, 0.5, 0.5), _WavingTint.xyz, float3(tmpvar_15, tmpvar_15, tmpvar_15));
    waveColor_5 = tmpvar_16;
    float3 tmpvar_17;
    tmpvar_17 = (vertex_3.xyz - _CameraPosition.xyz);
    float tmpvar_18;
    tmpvar_18 = clamp(((2 * (_WaveAndDistance.w - dot(tmpvar_17, tmpvar_17))) * _CameraPosition.w), 0, 1);
    color_4.w = tmpvar_18;
    float4 tmpvar_19;
    tmpvar_19.xyz = ((2 * waveColor_5) * in_v.color.xyz);
    tmpvar_19.w = color_4.w;
    float4 v_20;
    v_20.x = conv_mxt4x4_0(unity_WorldToObject).x;
    v_20.y = conv_mxt4x4_1(unity_WorldToObject).x;
    v_20.z = conv_mxt4x4_2(unity_WorldToObject).x;
    v_20.w = conv_mxt4x4_3(unity_WorldToObject).x;
    float4 v_21;
    v_21.x = conv_mxt4x4_0(unity_WorldToObject).y;
    v_21.y = conv_mxt4x4_1(unity_WorldToObject).y;
    v_21.z = conv_mxt4x4_2(unity_WorldToObject).y;
    v_21.w = conv_mxt4x4_3(unity_WorldToObject).y;
    float4 v_22;
    v_22.x = conv_mxt4x4_0(unity_WorldToObject).z;
    v_22.y = conv_mxt4x4_1(unity_WorldToObject).z;
    v_22.z = conv_mxt4x4_2(unity_WorldToObject).z;
    v_22.w = conv_mxt4x4_3(unity_WorldToObject).z;
    float3 tmpvar_23;
    tmpvar_23 = normalize((((v_20.xyz * in_v.normal.x) + (v_21.xyz * in_v.normal.y)) + (v_22.xyz * in_v.normal.z)));
    worldNormal_1 = tmpvar_23;
    tmpvar_2 = worldNormal_1;
    float3 normal_24;
    normal_24 = worldNormal_1;
    float4 tmpvar_25;
    tmpvar_25.w = 1;
    tmpvar_25.xyz = float3(normal_24);
    float3 res_26;
    float3 x_27;
    x_27.x = dot(unity_SHAr, tmpvar_25);
    x_27.y = dot(unity_SHAg, tmpvar_25);
    x_27.z = dot(unity_SHAb, tmpvar_25);
    float3 x1_28;
    float4 tmpvar_29;
    tmpvar_29 = (normal_24.xyzz * normal_24.yzzx);
    x1_28.x = dot(unity_SHBr, tmpvar_29);
    x1_28.y = dot(unity_SHBg, tmpvar_29);
    x1_28.z = dot(unity_SHBb, tmpvar_29);
    res_26 = (x_27 + (x1_28 + (unity_SHC.xyz * ((normal_24.x * normal_24.x) - (normal_24.y * normal_24.y)))));
    float _tmp_dvx_207 = max(((1.055 * pow(max(res_26, float3(0, 0, 0)), float3(0.4166667, 0.4166667, 0.4166667))) - 0.055), float3(0, 0, 0));
    res_26 = float3(_tmp_dvx_207, _tmp_dvx_207, _tmp_dvx_207);
    out_v.vertex = UnityObjectToClipPos(vertex_3);
    out_v.xlv_TEXCOORD0 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    out_v.xlv_TEXCOORD1 = tmpvar_2;
    out_v.xlv_TEXCOORD2 = mul(unity_ObjectToWorld, vertex_3).xyz;
    out_v.xlv_COLOR0 = tmpvar_19;
    out_v.xlv_TEXCOORD3 = max(float3(0, 0, 0), res_26);
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    float3 tmpvar_1;
    float3 tmpvar_2;
    float4 c_3;
    float3 tmpvar_4;
    float3 lightDir_5;
    float3 tmpvar_6;
    tmpvar_6 = _WorldSpaceLightPos0.xyz;
    lightDir_5 = tmpvar_6;
    tmpvar_4 = in_f.xlv_TEXCOORD1;
    float4 tmpvar_7;
    tmpvar_7 = (tex2D(_MainTex, in_f.xlv_TEXCOORD0) * in_f.xlv_COLOR0);
    float x_8;
    x_8 = (tmpvar_7.w - _Cutoff);
    if((x_8<0))
    {
        discard;
    }
    tmpvar_1 = _LightColor0.xyz;
    tmpvar_2 = lightDir_5;
    float4 c_9;
    float4 c_10;
    float diff_11;
    float tmpvar_12;
    tmpvar_12 = max(0, dot(tmpvar_4, tmpvar_2));
    diff_11 = tmpvar_12;
    c_10.xyz = ((tmpvar_7.xyz * tmpvar_1) * diff_11);
    c_10.w = (tmpvar_7.w * in_f.xlv_COLOR0.w);
    c_9.w = c_10.w;
    c_9.xyz = (c_10.xyz + (tmpvar_7.xyz * in_f.xlv_TEXCOORD3));
    c_3.xyz = c_9.xyz;
    c_3.w = 1;
    out_f.color = c_3;
    return out_f;
}


ENDCG

}
 Pass {
  Name "FORWARD"
  Tags { "LIGHTMODE"="ForwardAdd" "QUEUE"="Geometry+200" "IGNOREPROJECTOR"="true" "DisableBatching"="true" "RenderType"="Grass" }
  ZWrite Off
  Cull Off
  Blend One One
  ColorMask RGB
  GpuProgramID 90580
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"
#define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
#define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
#define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
#define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)


#define CODE_BLOCK_VERTEX
//uniform float4x4 UNITY_MATRIX_MVP;
//uniform float4x4 unity_ObjectToWorld;
// uniform float4x4 _World2Object;
uniform float4 _WavingTint;
uniform float4 _WaveAndDistance;
uniform float4 _CameraPosition;
uniform float4 _MainTex_ST;
//uniform float4 _WorldSpaceLightPos0;
uniform float4 _LightColor0;
uniform sampler2D _LightTexture0;
uniform float4x4 unity_WorldToLight;
uniform sampler2D _MainTex;
uniform float _Cutoff;
struct appdata_t
{
    float4 vertex :POSITION;
    float4 color :COLOR;
    float3 normal :NORMAL;
    float4 texcoord :TEXCOORD0;
};

struct OUT_Data_Vert
{
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float3 xlv_TEXCOORD1 :TEXCOORD1;
    float3 xlv_TEXCOORD2 :TEXCOORD2;
    float4 xlv_COLOR0 :COLOR0;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float3 xlv_TEXCOORD1 :TEXCOORD1;
    float3 xlv_TEXCOORD2 :TEXCOORD2;
    float4 xlv_COLOR0 :COLOR0;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
};

OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    float3 worldNormal_1;
    float3 tmpvar_2;
    float4 vertex_3;
    vertex_3.yw = in_v.vertex.yw;
    float4 color_4;
    color_4.xyz = in_v.color.xyz;
    float3 waveColor_5;
    float3 waveMove_6;
    float4 s_7;
    float4 waves_8;
    waves_8 = (in_v.vertex.x * (float4(0.012, 0.02, 0.06, 0.024) * _WaveAndDistance.y));
    waves_8 = (waves_8 + (in_v.vertex.z * (float4(0.006, 0.02, 0.02, 0.05) * _WaveAndDistance.y)));
    waves_8 = (waves_8 + (_WaveAndDistance.x * float4(1.2, 2, 1.6, 4.8)));
    float4 tmpvar_9;
    tmpvar_9 = frac(waves_8);
    waves_8 = tmpvar_9;
    float4 val_10;
    float4 s_11;
    val_10 = ((tmpvar_9 * 6.408849) - 3.141593);
    float4 tmpvar_12;
    tmpvar_12 = (val_10 * val_10);
    float4 tmpvar_13;
    tmpvar_13 = (tmpvar_12 * val_10);
    float4 tmpvar_14;
    tmpvar_14 = (tmpvar_13 * tmpvar_12);
    s_11 = (((val_10 + (tmpvar_13 * (-0.1616162))) + (tmpvar_14 * 0.0083333)) + ((tmpvar_14 * tmpvar_12) * (-0.00019841)));
    s_7 = (s_11 * s_11);
    s_7 = (s_7 * s_7);
    float tmpvar_15;
    tmpvar_15 = (dot(s_7, float4(0.6741998, 0.6741998, 0.2696799, 0.13484)) * 0.7);
    s_7 = (s_7 * (in_v.color.w * _WaveAndDistance.z));
    waveMove_6.y = 0;
    waveMove_6.x = dot(s_7, float4(0.024, 0.04, (-0.12), 0.096));
    waveMove_6.z = dot(s_7, float4(0.006, 0.02, (-0.02), 0.1));
    vertex_3.xz = (in_v.vertex.xz - (waveMove_6.xz * _WaveAndDistance.z));
    float3 tmpvar_16;
    tmpvar_16 = lerp(float3(0.5, 0.5, 0.5), _WavingTint.xyz, float3(tmpvar_15, tmpvar_15, tmpvar_15));
    waveColor_5 = tmpvar_16;
    float3 tmpvar_17;
    tmpvar_17 = (vertex_3.xyz - _CameraPosition.xyz);
    float tmpvar_18;
    tmpvar_18 = clamp(((2 * (_WaveAndDistance.w - dot(tmpvar_17, tmpvar_17))) * _CameraPosition.w), 0, 1);
    color_4.w = tmpvar_18;
    float4 tmpvar_19;
    tmpvar_19.xyz = ((2 * waveColor_5) * in_v.color.xyz);
    tmpvar_19.w = color_4.w;
    float4 v_20;
    v_20.x = conv_mxt4x4_0(unity_WorldToObject).x;
    v_20.y = conv_mxt4x4_1(unity_WorldToObject).x;
    v_20.z = conv_mxt4x4_2(unity_WorldToObject).x;
    v_20.w = conv_mxt4x4_3(unity_WorldToObject).x;
    float4 v_21;
    v_21.x = conv_mxt4x4_0(unity_WorldToObject).y;
    v_21.y = conv_mxt4x4_1(unity_WorldToObject).y;
    v_21.z = conv_mxt4x4_2(unity_WorldToObject).y;
    v_21.w = conv_mxt4x4_3(unity_WorldToObject).y;
    float4 v_22;
    v_22.x = conv_mxt4x4_0(unity_WorldToObject).z;
    v_22.y = conv_mxt4x4_1(unity_WorldToObject).z;
    v_22.z = conv_mxt4x4_2(unity_WorldToObject).z;
    v_22.w = conv_mxt4x4_3(unity_WorldToObject).z;
    float3 tmpvar_23;
    tmpvar_23 = normalize((((v_20.xyz * in_v.normal.x) + (v_21.xyz * in_v.normal.y)) + (v_22.xyz * in_v.normal.z)));
    worldNormal_1 = tmpvar_23;
    tmpvar_2 = worldNormal_1;
    out_v.vertex = UnityObjectToClipPos(vertex_3);
    out_v.xlv_TEXCOORD0 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    out_v.xlv_TEXCOORD1 = tmpvar_2;
    out_v.xlv_TEXCOORD2 = mul(unity_ObjectToWorld, vertex_3).xyz;
    out_v.xlv_COLOR0 = tmpvar_19;
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    float3 tmpvar_1;
    float3 tmpvar_2;
    float4 c_3;
    float3 tmpvar_4;
    float3 lightDir_5;
    float3 tmpvar_6;
    tmpvar_6 = normalize((_WorldSpaceLightPos0.xyz - in_f.xlv_TEXCOORD2));
    lightDir_5 = tmpvar_6;
    tmpvar_4 = in_f.xlv_TEXCOORD1;
    float4 tmpvar_7;
    tmpvar_7 = (tex2D(_MainTex, in_f.xlv_TEXCOORD0) * in_f.xlv_COLOR0);
    float x_8;
    x_8 = (tmpvar_7.w - _Cutoff);
    if((x_8<0))
    {
        discard;
    }
    float4 tmpvar_9;
    tmpvar_9.w = 1;
    tmpvar_9.xyz = in_f.xlv_TEXCOORD2;
    float3 tmpvar_10;
    tmpvar_10 = mul(unity_WorldToLight, tmpvar_9).xyz;
    float tmpvar_11;
    tmpvar_11 = dot(tmpvar_10, tmpvar_10);
    float tmpvar_12;
    tmpvar_12 = tex2D(_LightTexture0, float2(tmpvar_11, tmpvar_11)).w;
    tmpvar_1 = _LightColor0.xyz;
    tmpvar_2 = lightDir_5;
    tmpvar_1 = (tmpvar_1 * tmpvar_12);
    float4 c_13;
    float4 c_14;
    float diff_15;
    float tmpvar_16;
    tmpvar_16 = max(0, dot(tmpvar_4, tmpvar_2));
    diff_15 = tmpvar_16;
    c_14.xyz = ((tmpvar_7.xyz * tmpvar_1) * diff_15);
    c_14.w = (tmpvar_7.w * in_f.xlv_COLOR0.w);
    c_13.w = c_14.w;
    c_13.xyz = c_14.xyz;
    c_3.xyz = c_13.xyz;
    c_3.w = 1;
    out_f.color = c_3;
    return out_f;
}


ENDCG

}
 Pass {
  Name "PREPASS"
  Tags { "LIGHTMODE"="PrePassBase" "QUEUE"="Geometry+200" "IGNOREPROJECTOR"="true" "DisableBatching"="true" "RenderType"="Grass" }
  Cull Off
  ColorMask RGB
  GpuProgramID 182601
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"
#define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
#define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
#define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
#define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)


#define CODE_BLOCK_VERTEX
//uniform float4x4 UNITY_MATRIX_MVP;
//uniform float4x4 unity_ObjectToWorld;
// uniform float4x4 _World2Object;
uniform float4 _WavingTint;
uniform float4 _WaveAndDistance;
uniform float4 _CameraPosition;
uniform float4 _MainTex_ST;
uniform sampler2D _MainTex;
uniform float _Cutoff;
struct appdata_t
{
    float4 vertex :POSITION;
    float4 color :COLOR;
    float3 normal :NORMAL;
    float4 texcoord :TEXCOORD0;
};

struct OUT_Data_Vert
{
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float3 xlv_TEXCOORD1 :TEXCOORD1;
    float3 xlv_TEXCOORD2 :TEXCOORD2;
    float4 xlv_COLOR0 :COLOR0;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float3 xlv_TEXCOORD1 :TEXCOORD1;
    float4 xlv_COLOR0 :COLOR0;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
};

OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    float3 worldNormal_1;
    float3 tmpvar_2;
    float4 vertex_3;
    vertex_3.yw = in_v.vertex.yw;
    float4 color_4;
    color_4.xyz = in_v.color.xyz;
    float3 waveColor_5;
    float3 waveMove_6;
    float4 s_7;
    float4 waves_8;
    waves_8 = (in_v.vertex.x * (float4(0.012, 0.02, 0.06, 0.024) * _WaveAndDistance.y));
    waves_8 = (waves_8 + (in_v.vertex.z * (float4(0.006, 0.02, 0.02, 0.05) * _WaveAndDistance.y)));
    waves_8 = (waves_8 + (_WaveAndDistance.x * float4(1.2, 2, 1.6, 4.8)));
    float4 tmpvar_9;
    tmpvar_9 = frac(waves_8);
    waves_8 = tmpvar_9;
    float4 val_10;
    float4 s_11;
    val_10 = ((tmpvar_9 * 6.408849) - 3.141593);
    float4 tmpvar_12;
    tmpvar_12 = (val_10 * val_10);
    float4 tmpvar_13;
    tmpvar_13 = (tmpvar_12 * val_10);
    float4 tmpvar_14;
    tmpvar_14 = (tmpvar_13 * tmpvar_12);
    s_11 = (((val_10 + (tmpvar_13 * (-0.1616162))) + (tmpvar_14 * 0.0083333)) + ((tmpvar_14 * tmpvar_12) * (-0.00019841)));
    s_7 = (s_11 * s_11);
    s_7 = (s_7 * s_7);
    float tmpvar_15;
    tmpvar_15 = (dot(s_7, float4(0.6741998, 0.6741998, 0.2696799, 0.13484)) * 0.7);
    s_7 = (s_7 * (in_v.color.w * _WaveAndDistance.z));
    waveMove_6.y = 0;
    waveMove_6.x = dot(s_7, float4(0.024, 0.04, (-0.12), 0.096));
    waveMove_6.z = dot(s_7, float4(0.006, 0.02, (-0.02), 0.1));
    vertex_3.xz = (in_v.vertex.xz - (waveMove_6.xz * _WaveAndDistance.z));
    float3 tmpvar_16;
    tmpvar_16 = lerp(float3(0.5, 0.5, 0.5), _WavingTint.xyz, float3(tmpvar_15, tmpvar_15, tmpvar_15));
    waveColor_5 = tmpvar_16;
    float3 tmpvar_17;
    tmpvar_17 = (vertex_3.xyz - _CameraPosition.xyz);
    float tmpvar_18;
    tmpvar_18 = clamp(((2 * (_WaveAndDistance.w - dot(tmpvar_17, tmpvar_17))) * _CameraPosition.w), 0, 1);
    color_4.w = tmpvar_18;
    float4 tmpvar_19;
    tmpvar_19.xyz = ((2 * waveColor_5) * in_v.color.xyz);
    tmpvar_19.w = color_4.w;
    float4 v_20;
    v_20.x = conv_mxt4x4_0(unity_WorldToObject).x;
    v_20.y = conv_mxt4x4_1(unity_WorldToObject).x;
    v_20.z = conv_mxt4x4_2(unity_WorldToObject).x;
    v_20.w = conv_mxt4x4_3(unity_WorldToObject).x;
    float4 v_21;
    v_21.x = conv_mxt4x4_0(unity_WorldToObject).y;
    v_21.y = conv_mxt4x4_1(unity_WorldToObject).y;
    v_21.z = conv_mxt4x4_2(unity_WorldToObject).y;
    v_21.w = conv_mxt4x4_3(unity_WorldToObject).y;
    float4 v_22;
    v_22.x = conv_mxt4x4_0(unity_WorldToObject).z;
    v_22.y = conv_mxt4x4_1(unity_WorldToObject).z;
    v_22.z = conv_mxt4x4_2(unity_WorldToObject).z;
    v_22.w = conv_mxt4x4_3(unity_WorldToObject).z;
    float3 tmpvar_23;
    tmpvar_23 = normalize((((v_20.xyz * in_v.normal.x) + (v_21.xyz * in_v.normal.y)) + (v_22.xyz * in_v.normal.z)));
    worldNormal_1 = tmpvar_23;
    tmpvar_2 = worldNormal_1;
    out_v.vertex = UnityObjectToClipPos(vertex_3);
    out_v.xlv_TEXCOORD0 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    out_v.xlv_TEXCOORD1 = tmpvar_2;
    out_v.xlv_TEXCOORD2 = mul(unity_ObjectToWorld, vertex_3).xyz;
    out_v.xlv_COLOR0 = tmpvar_19;
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    float4 res_1;
    float3 tmpvar_2;
    tmpvar_2 = in_f.xlv_TEXCOORD1;
    float x_3;
    x_3 = ((tex2D(_MainTex, in_f.xlv_TEXCOORD0) * in_f.xlv_COLOR0).w - _Cutoff);
    if((x_3<0))
    {
        discard;
    }
    res_1.xyz = float3(((tmpvar_2 * 0.5) + 0.5));
    res_1.w = 0;
    out_f.color = res_1;
    return out_f;
}


ENDCG

}
 Pass {
  Name "PREPASS"
  Tags { "LIGHTMODE"="PrePassFinal" "QUEUE"="Geometry+200" "IGNOREPROJECTOR"="true" "DisableBatching"="true" "RenderType"="Grass" }
  ZWrite Off
  Cull Off
  ColorMask RGB
  GpuProgramID 196861
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"
#define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
#define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
#define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
#define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)


#define CODE_BLOCK_VERTEX
//uniform float4 _ProjectionParams;
//uniform float4 unity_SHAr;
//uniform float4 unity_SHAg;
//uniform float4 unity_SHAb;
//uniform float4 unity_SHBr;
//uniform float4 unity_SHBg;
//uniform float4 unity_SHBb;
//uniform float4 unity_SHC;
//uniform float4x4 UNITY_MATRIX_MVP;
//uniform float4x4 unity_ObjectToWorld;
// uniform float4x4 _World2Object;
uniform float4 _WavingTint;
uniform float4 _WaveAndDistance;
uniform float4 _CameraPosition;
uniform float4 _MainTex_ST;
uniform sampler2D _MainTex;
uniform float _Cutoff;
uniform sampler2D _LightBuffer;
struct appdata_t
{
    float4 vertex :POSITION;
    float4 color :COLOR;
    float3 normal :NORMAL;
    float4 texcoord :TEXCOORD0;
};

struct OUT_Data_Vert
{
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float3 xlv_TEXCOORD1 :TEXCOORD1;
    float4 xlv_COLOR0 :COLOR0;
    float4 xlv_TEXCOORD2 :TEXCOORD2;
    float4 xlv_TEXCOORD3 :TEXCOORD3;
    float3 xlv_TEXCOORD4 :TEXCOORD4;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float4 xlv_COLOR0 :COLOR0;
    float4 xlv_TEXCOORD2 :TEXCOORD2;
    float3 xlv_TEXCOORD4 :TEXCOORD4;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
};

OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    float4 tmpvar_1;
    float4 tmpvar_2;
    float3 tmpvar_3;
    float4 vertex_4;
    vertex_4.yw = in_v.vertex.yw;
    float4 color_5;
    color_5.xyz = in_v.color.xyz;
    float3 waveColor_6;
    float3 waveMove_7;
    float4 s_8;
    float4 waves_9;
    waves_9 = (in_v.vertex.x * (float4(0.012, 0.02, 0.06, 0.024) * _WaveAndDistance.y));
    waves_9 = (waves_9 + (in_v.vertex.z * (float4(0.006, 0.02, 0.02, 0.05) * _WaveAndDistance.y)));
    waves_9 = (waves_9 + (_WaveAndDistance.x * float4(1.2, 2, 1.6, 4.8)));
    float4 tmpvar_10;
    tmpvar_10 = frac(waves_9);
    waves_9 = tmpvar_10;
    float4 val_11;
    float4 s_12;
    val_11 = ((tmpvar_10 * 6.408849) - 3.141593);
    float4 tmpvar_13;
    tmpvar_13 = (val_11 * val_11);
    float4 tmpvar_14;
    tmpvar_14 = (tmpvar_13 * val_11);
    float4 tmpvar_15;
    tmpvar_15 = (tmpvar_14 * tmpvar_13);
    s_12 = (((val_11 + (tmpvar_14 * (-0.1616162))) + (tmpvar_15 * 0.0083333)) + ((tmpvar_15 * tmpvar_13) * (-0.00019841)));
    s_8 = (s_12 * s_12);
    s_8 = (s_8 * s_8);
    float tmpvar_16;
    tmpvar_16 = (dot(s_8, float4(0.6741998, 0.6741998, 0.2696799, 0.13484)) * 0.7);
    s_8 = (s_8 * (in_v.color.w * _WaveAndDistance.z));
    waveMove_7.y = 0;
    waveMove_7.x = dot(s_8, float4(0.024, 0.04, (-0.12), 0.096));
    waveMove_7.z = dot(s_8, float4(0.006, 0.02, (-0.02), 0.1));
    vertex_4.xz = (in_v.vertex.xz - (waveMove_7.xz * _WaveAndDistance.z));
    float3 tmpvar_17;
    tmpvar_17 = lerp(float3(0.5, 0.5, 0.5), _WavingTint.xyz, float3(tmpvar_16, tmpvar_16, tmpvar_16));
    waveColor_6 = tmpvar_17;
    float3 tmpvar_18;
    tmpvar_18 = (vertex_4.xyz - _CameraPosition.xyz);
    float tmpvar_19;
    tmpvar_19 = clamp(((2 * (_WaveAndDistance.w - dot(tmpvar_18, tmpvar_18))) * _CameraPosition.w), 0, 1);
    color_5.w = tmpvar_19;
    float4 tmpvar_20;
    tmpvar_20.xyz = ((2 * waveColor_6) * in_v.color.xyz);
    tmpvar_20.w = color_5.w;
    tmpvar_1 = UnityObjectToClipPos(vertex_4);
    float4 o_21;
    float4 tmpvar_22;
    tmpvar_22 = (tmpvar_1 * 0.5);
    float2 tmpvar_23;
    tmpvar_23.x = tmpvar_22.x;
    tmpvar_23.y = (tmpvar_22.y * _ProjectionParams.x);
    o_21.xy = (tmpvar_23 + tmpvar_22.w);
    o_21.zw = tmpvar_1.zw;
    tmpvar_2.zw = float2(0, 0);
    tmpvar_2.xy = float2(0, 0);
    float4 v_24;
    v_24.x = conv_mxt4x4_0(unity_WorldToObject).x;
    v_24.y = conv_mxt4x4_1(unity_WorldToObject).x;
    v_24.z = conv_mxt4x4_2(unity_WorldToObject).x;
    v_24.w = conv_mxt4x4_3(unity_WorldToObject).x;
    float4 v_25;
    v_25.x = conv_mxt4x4_0(unity_WorldToObject).y;
    v_25.y = conv_mxt4x4_1(unity_WorldToObject).y;
    v_25.z = conv_mxt4x4_2(unity_WorldToObject).y;
    v_25.w = conv_mxt4x4_3(unity_WorldToObject).y;
    float4 v_26;
    v_26.x = conv_mxt4x4_0(unity_WorldToObject).z;
    v_26.y = conv_mxt4x4_1(unity_WorldToObject).z;
    v_26.z = conv_mxt4x4_2(unity_WorldToObject).z;
    v_26.w = conv_mxt4x4_3(unity_WorldToObject).z;
    float4 tmpvar_27;
    tmpvar_27.w = 1;
    tmpvar_27.xyz = normalize((((v_24.xyz * in_v.normal.x) + (v_25.xyz * in_v.normal.y)) + (v_26.xyz * in_v.normal.z)));
    float4 normal_28;
    normal_28 = tmpvar_27;
    float3 res_29;
    float3 x_30;
    x_30.x = dot(unity_SHAr, normal_28);
    x_30.y = dot(unity_SHAg, normal_28);
    x_30.z = dot(unity_SHAb, normal_28);
    float3 x1_31;
    float4 tmpvar_32;
    tmpvar_32 = (normal_28.xyzz * normal_28.yzzx);
    x1_31.x = dot(unity_SHBr, tmpvar_32);
    x1_31.y = dot(unity_SHBg, tmpvar_32);
    x1_31.z = dot(unity_SHBb, tmpvar_32);
    res_29 = (x_30 + (x1_31 + (unity_SHC.xyz * ((normal_28.x * normal_28.x) - (normal_28.y * normal_28.y)))));
    float _tmp_dvx_201 = max(((1.055 * pow(max(res_29, float3(0, 0, 0)), float3(0.4166667, 0.4166667, 0.4166667))) - 0.055), float3(0, 0, 0));
    res_29 = float3(_tmp_dvx_201, _tmp_dvx_201, _tmp_dvx_201);
    tmpvar_3 = res_29;
    out_v.vertex = tmpvar_1;
    out_v.xlv_TEXCOORD0 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    out_v.xlv_TEXCOORD1 = mul(unity_ObjectToWorld, vertex_4).xyz;
    out_v.xlv_COLOR0 = tmpvar_20;
    out_v.xlv_TEXCOORD2 = o_21;
    out_v.xlv_TEXCOORD3 = tmpvar_2;
    out_v.xlv_TEXCOORD4 = tmpvar_3;
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    float4 tmpvar_1;
    float4 c_2;
    float4 light_3;
    float4 tmpvar_4;
    tmpvar_4 = (tex2D(_MainTex, in_f.xlv_TEXCOORD0) * in_f.xlv_COLOR0);
    float x_5;
    x_5 = (tmpvar_4.w - _Cutoff);
    if((x_5<0))
    {
        discard;
    }
    float4 tmpvar_6;
    tmpvar_6 = tex2D(_LightBuffer, in_f.xlv_TEXCOORD2);
    light_3 = tmpvar_6;
    light_3 = (-log2(max(light_3, float4(0.001, 0.001, 0.001, 0.001))));
    light_3.xyz = (light_3.xyz + in_f.xlv_TEXCOORD4);
    float4 c_7;
    c_7.xyz = (tmpvar_4.xyz * light_3.xyz);
    c_7.w = (tmpvar_4.w * in_f.xlv_COLOR0.w);
    c_2.xyz = c_7.xyz;
    c_2.w = 1;
    tmpvar_1 = c_2;
    out_f.color = tmpvar_1;
    return out_f;
}


ENDCG

}
 Pass {
  Name "SHADOWCASTER"
  Tags { "LIGHTMODE"="SHADOWCASTER" "QUEUE"="Geometry+200" "IGNOREPROJECTOR"="true" "SHADOWSUPPORT"="true" "DisableBatching"="true" "RenderType"="Grass" }
  Cull Off
  ColorMask RGB
  GpuProgramID 322101
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"
#define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
#define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
#define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)
#define conv_mxt4x4_3(mat4x4) float4(mat4x4[0].w,mat4x4[1].w,mat4x4[2].w,mat4x4[3].w)


#define CODE_BLOCK_VERTEX
//uniform float4 _WorldSpaceLightPos0;
//uniform float4 unity_LightShadowBias;
//uniform float4x4 UNITY_MATRIX_MVP;
//uniform float4x4 unity_ObjectToWorld;
// uniform float4x4 _World2Object;
//uniform float4x4 unity_MatrixVP;
uniform float4 _WavingTint;
uniform float4 _WaveAndDistance;
uniform float4 _CameraPosition;
uniform float4 _MainTex_ST;
uniform sampler2D _MainTex;
uniform float _Cutoff;
struct appdata_t
{
    float4 vertex :POSITION;
    float4 color :COLOR;
    float3 normal :NORMAL;
    float4 texcoord :TEXCOORD0;
};

struct OUT_Data_Vert
{
    float2 xlv_TEXCOORD1 :TEXCOORD1;
    float3 xlv_TEXCOORD2 :TEXCOORD2;
    float4 xlv_COLOR0 :COLOR0;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float2 xlv_TEXCOORD1 :TEXCOORD1;
    float4 xlv_COLOR0 :COLOR0;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
};

OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    float2 tmpvar_1;
    float4 vertex_2;
    vertex_2.yw = in_v.vertex.yw;
    float4 color_3;
    color_3.xyz = in_v.color.xyz;
    float3 waveColor_4;
    float3 waveMove_5;
    float4 s_6;
    float4 waves_7;
    waves_7 = (in_v.vertex.x * (float4(0.012, 0.02, 0.06, 0.024) * _WaveAndDistance.y));
    waves_7 = (waves_7 + (in_v.vertex.z * (float4(0.006, 0.02, 0.02, 0.05) * _WaveAndDistance.y)));
    waves_7 = (waves_7 + (_WaveAndDistance.x * float4(1.2, 2, 1.6, 4.8)));
    float4 tmpvar_8;
    tmpvar_8 = frac(waves_7);
    waves_7 = tmpvar_8;
    float4 val_9;
    float4 s_10;
    val_9 = ((tmpvar_8 * 6.408849) - 3.141593);
    float4 tmpvar_11;
    tmpvar_11 = (val_9 * val_9);
    float4 tmpvar_12;
    tmpvar_12 = (tmpvar_11 * val_9);
    float4 tmpvar_13;
    tmpvar_13 = (tmpvar_12 * tmpvar_11);
    s_10 = (((val_9 + (tmpvar_12 * (-0.1616162))) + (tmpvar_13 * 0.0083333)) + ((tmpvar_13 * tmpvar_11) * (-0.00019841)));
    s_6 = (s_10 * s_10);
    s_6 = (s_6 * s_6);
    float tmpvar_14;
    tmpvar_14 = (dot(s_6, float4(0.6741998, 0.6741998, 0.2696799, 0.13484)) * 0.7);
    s_6 = (s_6 * (in_v.color.w * _WaveAndDistance.z));
    waveMove_5.y = 0;
    waveMove_5.x = dot(s_6, float4(0.024, 0.04, (-0.12), 0.096));
    waveMove_5.z = dot(s_6, float4(0.006, 0.02, (-0.02), 0.1));
    vertex_2.xz = (in_v.vertex.xz - (waveMove_5.xz * _WaveAndDistance.z));
    float3 tmpvar_15;
    tmpvar_15 = lerp(float3(0.5, 0.5, 0.5), _WavingTint.xyz, float3(tmpvar_14, tmpvar_14, tmpvar_14));
    waveColor_4 = tmpvar_15;
    float3 tmpvar_16;
    tmpvar_16 = (vertex_2.xyz - _CameraPosition.xyz);
    float tmpvar_17;
    tmpvar_17 = clamp(((2 * (_WaveAndDistance.w - dot(tmpvar_16, tmpvar_16))) * _CameraPosition.w), 0, 1);
    color_3.w = tmpvar_17;
    float4 tmpvar_18;
    tmpvar_18.xyz = ((2 * waveColor_4) * in_v.color.xyz);
    tmpvar_18.w = color_3.w;
    tmpvar_1 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    float3 tmpvar_19;
    tmpvar_19 = mul(unity_ObjectToWorld, vertex_2).xyz;
    float3 vertex_20;
    vertex_20 = vertex_2.xyz;
    float4 clipPos_21;
    if((unity_LightShadowBias.z!=0))
    {
        float4 tmpvar_22;
        tmpvar_22.w = 1;
        tmpvar_22.xyz = float3(vertex_20);
        float3 tmpvar_23;
        tmpvar_23 = mul(unity_ObjectToWorld, tmpvar_22).xyz;
        float4 v_24;
        v_24.x = conv_mxt4x4_0(unity_WorldToObject).x;
        v_24.y = conv_mxt4x4_1(unity_WorldToObject).x;
        v_24.z = conv_mxt4x4_2(unity_WorldToObject).x;
        v_24.w = conv_mxt4x4_3(unity_WorldToObject).x;
        float4 v_25;
        v_25.x = conv_mxt4x4_0(unity_WorldToObject).y;
        v_25.y = conv_mxt4x4_1(unity_WorldToObject).y;
        v_25.z = conv_mxt4x4_2(unity_WorldToObject).y;
        v_25.w = conv_mxt4x4_3(unity_WorldToObject).y;
        float4 v_26;
        v_26.x = conv_mxt4x4_0(unity_WorldToObject).z;
        v_26.y = conv_mxt4x4_1(unity_WorldToObject).z;
        v_26.z = conv_mxt4x4_2(unity_WorldToObject).z;
        v_26.w = conv_mxt4x4_3(unity_WorldToObject).z;
        float3 tmpvar_27;
        tmpvar_27 = normalize((((v_24.xyz * in_v.normal.x) + (v_25.xyz * in_v.normal.y)) + (v_26.xyz * in_v.normal.z)));
        float tmpvar_28;
        tmpvar_28 = dot(tmpvar_27, normalize((_WorldSpaceLightPos0.xyz - (tmpvar_23 * _WorldSpaceLightPos0.w))));
        float4 tmpvar_29;
        tmpvar_29.w = 1;
        tmpvar_29.xyz = (tmpvar_23 - (tmpvar_27 * (unity_LightShadowBias.z * sqrt((1 - (tmpvar_28 * tmpvar_28))))));
        clipPos_21 = mul(unity_MatrixVP, tmpvar_29);
    }
    else
    {
        float4 tmpvar_30;
        tmpvar_30.w = 1;
        tmpvar_30.xyz = float3(vertex_20);
        clipPos_21 = UnityObjectToClipPos(tmpvar_30);
    }
    float4 clipPos_31;
    clipPos_31.xyw = clipPos_21.xyw;
    clipPos_31.z = (clipPos_21.z + clamp((unity_LightShadowBias.x / clipPos_21.w), 0, 1));
    clipPos_31.z = lerp(clipPos_31.z, max(clipPos_31.z, (-clipPos_21.w)), unity_LightShadowBias.y);
    out_v.vertex = clipPos_31;
    out_v.xlv_TEXCOORD1 = tmpvar_1;
    out_v.xlv_TEXCOORD2 = tmpvar_19;
    out_v.xlv_COLOR0 = tmpvar_18;
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    float x_1;
    x_1 = ((tex2D(_MainTex, in_f.xlv_TEXCOORD1) * in_f.xlv_COLOR0).w - _Cutoff);
    if((x_1<0))
    {
        discard;
    }
    out_f.color = float4(0, 0, 0, 0);
    return out_f;
}


ENDCG

}
}
SubShader { 
 LOD 200
 Tags { "QUEUE"="Geometry+200" "IGNOREPROJECTOR"="true" "RenderType"="Grass" }
 Pass {
  Tags { "LIGHTMODE"="Vertex" "QUEUE"="Geometry+200" "IGNOREPROJECTOR"="true" "RenderType"="Grass" }
  Cull Off
  ColorMask RGB
  GpuProgramID 449512
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"
#define conv_mxt4x4_0(mat4x4) float4(mat4x4[0].x,mat4x4[1].x,mat4x4[2].x,mat4x4[3].x)
#define conv_mxt4x4_1(mat4x4) float4(mat4x4[0].y,mat4x4[1].y,mat4x4[2].y,mat4x4[3].y)
#define conv_mxt4x4_2(mat4x4) float4(mat4x4[0].z,mat4x4[1].z,mat4x4[2].z,mat4x4[3].z)


#define CODE_BLOCK_VERTEX
//uniform float4 unity_LightColor[8];
//uniform float4 unity_LightPosition[8];
//uniform float4x4 UNITY_MATRIX_MVP;
//uniform float4x4 UNITY_MATRIX_IT_MV;
//uniform float4 glstate_lightmodel_ambient;
uniform float4 _MainTex_ST;
uniform sampler2D _MainTex;
uniform float _Cutoff;
struct appdata_t
{
    float4 vertex :POSITION;
    float4 color :COLOR;
    float3 normal :NORMAL;
    float4 texcoord :TEXCOORD0;
};

struct OUT_Data_Vert
{
    float4 xlv_COLOR0 :COLOR0;
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float4 xlv_COLOR0 :COLOR0;
    float2 xlv_TEXCOORD0 :TEXCOORD0;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
};

OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    float3 lcolor_1;
    float3 eyeNormal_2;
    float4 color_3;
    color_3.w = in_v.color.w;
    float3x3 tmpvar_4;
    tmpvar_4[0] = conv_mxt4x4_0(UNITY_MATRIX_IT_MV).xyz;
    tmpvar_4[1] = conv_mxt4x4_1(UNITY_MATRIX_IT_MV).xyz;
    tmpvar_4[2] = conv_mxt4x4_2(UNITY_MATRIX_IT_MV).xyz;
    float3 tmpvar_5;
    tmpvar_5 = normalize(mul(tmpvar_4, in_v.normal));
    eyeNormal_2 = tmpvar_5;
    lcolor_1 = (in_v.color.xyz * glstate_lightmodel_ambient.xyz);
    float3 tmpvar_6;
    tmpvar_6 = unity_LightPosition[0].xyz;
    float3 dirToLight_7;
    dirToLight_7 = tmpvar_6;
    lcolor_1 = (lcolor_1 + min((((max(dot(eyeNormal_2, dirToLight_7), 0) * in_v.color.xyz) * unity_LightColor[0].xyz) * 0.5), float3(1, 1, 1)));
    float3 tmpvar_8;
    tmpvar_8 = unity_LightPosition[1].xyz;
    float3 dirToLight_9;
    dirToLight_9 = tmpvar_8;
    lcolor_1 = (lcolor_1 + min((((max(dot(eyeNormal_2, dirToLight_9), 0) * in_v.color.xyz) * unity_LightColor[1].xyz) * 0.5), float3(1, 1, 1)));
    float3 tmpvar_10;
    tmpvar_10 = unity_LightPosition[2].xyz;
    float3 dirToLight_11;
    dirToLight_11 = tmpvar_10;
    lcolor_1 = (lcolor_1 + min((((max(dot(eyeNormal_2, dirToLight_11), 0) * in_v.color.xyz) * unity_LightColor[2].xyz) * 0.5), float3(1, 1, 1)));
    float3 tmpvar_12;
    tmpvar_12 = unity_LightPosition[3].xyz;
    float3 dirToLight_13;
    dirToLight_13 = tmpvar_12;
    lcolor_1 = (lcolor_1 + min((((max(dot(eyeNormal_2, dirToLight_13), 0) * in_v.color.xyz) * unity_LightColor[3].xyz) * 0.5), float3(1, 1, 1)));
    float3 tmpvar_14;
    tmpvar_14 = unity_LightPosition[4].xyz;
    float3 dirToLight_15;
    dirToLight_15 = tmpvar_14;
    lcolor_1 = (lcolor_1 + min((((max(dot(eyeNormal_2, dirToLight_15), 0) * in_v.color.xyz) * unity_LightColor[4].xyz) * 0.5), float3(1, 1, 1)));
    float3 tmpvar_16;
    tmpvar_16 = unity_LightPosition[5].xyz;
    float3 dirToLight_17;
    dirToLight_17 = tmpvar_16;
    lcolor_1 = (lcolor_1 + min((((max(dot(eyeNormal_2, dirToLight_17), 0) * in_v.color.xyz) * unity_LightColor[5].xyz) * 0.5), float3(1, 1, 1)));
    float3 tmpvar_18;
    tmpvar_18 = unity_LightPosition[6].xyz;
    float3 dirToLight_19;
    dirToLight_19 = tmpvar_18;
    lcolor_1 = (lcolor_1 + min((((max(dot(eyeNormal_2, dirToLight_19), 0) * in_v.color.xyz) * unity_LightColor[6].xyz) * 0.5), float3(1, 1, 1)));
    float3 tmpvar_20;
    tmpvar_20 = unity_LightPosition[7].xyz;
    float3 dirToLight_21;
    dirToLight_21 = tmpvar_20;
    lcolor_1 = (lcolor_1 + min((((max(dot(eyeNormal_2, dirToLight_21), 0) * in_v.color.xyz) * unity_LightColor[7].xyz) * 0.5), float3(1, 1, 1)));
    color_3.xyz = float3(lcolor_1);
    color_3.w = color_3.w;
    float4 tmpvar_22;
    float4 tmpvar_23;
    tmpvar_23 = clamp(color_3, 0, 1);
    tmpvar_22 = tmpvar_23;
    float4 tmpvar_24;
    tmpvar_24.w = 1;
    tmpvar_24.xyz = in_v.vertex.xyz;
    out_v.xlv_COLOR0 = tmpvar_22;
    out_v.xlv_TEXCOORD0 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    out_v.vertex = UnityObjectToClipPos(tmpvar_24);
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    float4 col_1;
    float4 tmpvar_2;
    tmpvar_2 = tex2D(_MainTex, in_f.xlv_TEXCOORD0);
    col_1.xyz = (tmpvar_2 * in_f.xlv_COLOR0).xyz;
    col_1.xyz = (col_1 * 2).xyz;
    col_1.w = tmpvar_2.w;
    if((tmpvar_2.w<=_Cutoff))
    {
        discard;
    }
    out_f.color = col_1;
    return out_f;
}


ENDCG

}
 Pass {
  Tags { "LIGHTMODE"="VertexLMRGBM" "QUEUE"="Geometry+200" "IGNOREPROJECTOR"="true" "RenderType"="Grass" }
  Cull Off
  ColorMask RGB
  GpuProgramID 483723
CGPROGRAM
//#pragma target 4.0

#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"


#define CODE_BLOCK_VERTEX
//uniform float4x4 UNITY_MATRIX_MVP;
// uniform float4 unity_LightmapST;
uniform float4 _MainTex_ST;
// uniform sampler2D unity_Lightmap;
uniform sampler2D _MainTex;
uniform float _Cutoff;
struct appdata_t
{
    float4 vertex :POSITION;
    float4 texcoord :TEXCOORD0;
    float4 texcoord1 :TEXCOORD1;
};

struct OUT_Data_Vert
{
    float4 xlv_COLOR0 :COLOR0;
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float2 xlv_TEXCOORD1 :TEXCOORD1;
    float4 vertex :SV_POSITION;
};

struct v2f
{
    float2 xlv_TEXCOORD0 :TEXCOORD0;
    float2 xlv_TEXCOORD1 :TEXCOORD1;
};

struct OUT_Data_Frag
{
    float4 color :SV_Target0;
};

OUT_Data_Vert vert(appdata_t in_v)
{
    OUT_Data_Vert out_v;
    float4 tmpvar_1;
    float4 tmpvar_2;
    tmpvar_2 = clamp(float4(0, 0, 0, 1.1), 0, 1);
    tmpvar_1 = tmpvar_2;
    float4 tmpvar_3;
    tmpvar_3.w = 1;
    tmpvar_3.xyz = in_v.vertex.xyz;
    out_v.xlv_COLOR0 = tmpvar_1;
    out_v.xlv_TEXCOORD0 = ((in_v.texcoord1.xy * unity_LightmapST.xy) + unity_LightmapST.zw);
    out_v.xlv_TEXCOORD1 = TRANSFORM_TEX(in_v.texcoord.xy, _MainTex);
    out_v.vertex = UnityObjectToClipPos(tmpvar_3);
    return out_v;
}

#define CODE_BLOCK_FRAGMENT
OUT_Data_Frag frag(v2f in_f)
{
    OUT_Data_Frag out_f;
    float4 col_1;
    float4 tmpvar_2;
    tmpvar_2 = UNITY_SAMPLE_TEX2D(unity_Lightmap, in_f.xlv_TEXCOORD0);
    col_1 = (tmpvar_2 * tmpvar_2.w);
    col_1 = (col_1 * 2);
    float4 tmpvar_3;
    tmpvar_3 = tex2D(_MainTex, in_f.xlv_TEXCOORD1);
    col_1.xyz = (tmpvar_3 * col_1).xyz;
    col_1.xyz = (col_1 * 4).xyz;
    col_1.w = tmpvar_3.w;
    if((tmpvar_3.w<=_Cutoff))
    {
        discard;
    }
    out_f.color = col_1;
    return out_f;
}


ENDCG

}
}
Fallback Off
}